<template>
	<view class="address_item u-border-bottom" @click="$emit('handleItem')">
		<view class="top">
			<u-tag style="margin-right: 10rpx" v-if="item.isDefault==1" size="mini" text="默认" mode="plain" />
			<view class="title">
				地址:{{item.location}}
				<br />
				街道:{{item.street}}
			</view>
		</view>
		<view class="bottom">
			<view class="title">
				{{item.contactName}} {{item.contactPhone}}
			</view>
			<view class="icons">
				<image @click.stop="$emit('edit')" src="../../static/img/edit.png" class="icon_img" mode=""></image>
				<image @click.stop="$emit('delete')" src="../../static/img/delete.png" class="icon_img" mode=""></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "ZY-address",
		props: {
			item: {
				type: Object,
				default: () => {}

			}
		},
		data() {
			return {

			};
		}
	}
</script>

<style lang="scss" scoped>
	.address_item {
		padding: 30rpx;

		.bottom {
			display: flex;
			justify-content: space-between;
			align-items: center;

			.icons {
				display: flex;
				align-items: center;

				.icon_img {
					width: 30rpx;
					height: 30rpx;
					margin-left: 46rpx;

					&:first-child {
						margin-left: 0;
					}
				}
			}

			.title {
				font-size: 25rpx;
				color: #B9B9B9;
				width: 100%;
			}
		}

		.top {
			display: flex;
			align-items: center;
			margin-bottom: 26rpx;

			.title {
				// margin-left: 10rpx;
				font-size: 28rpx;
				color: #424242;
			}
		}

	}
</style>
